<?php

/**
 * This is the model class for table "jumlahpendaftarhajibank".
 *
 * The followings are the available columns in table 'jumlahpendaftarhajibank':
 * @property integer $jphb_id
 * @property string $jphb_bank
 * @property integer $jphb_daftar_laki
 * @property integer $jphb_daftar_perempuan
 * @property integer $jphb_batal_laki
 * @property integer $jphb_batal_perempuan
 * @property integer $jphb_berangkat_laki
 * @property integer $jphb_berangkat_perempuan
 * @property integer $jphb_tahun
 */
class Jumlahpendaftarhajibank extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return Jumlahpendaftarhajibank the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'jumlahpendaftarhajibank';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('jphb_daftar_laki, jphb_daftar_perempuan, jphb_batal_laki, jphb_batal_perempuan, jphb_berangkat_laki, jphb_berangkat_perempuan, jphb_tahun', 'numerical', 'integerOnly'=>true),
			array('jphb_bank', 'length', 'max'=>64),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('jphb_id, jphb_bank, jphb_daftar_laki, jphb_daftar_perempuan, jphb_batal_laki, jphb_batal_perempuan, jphb_berangkat_laki, jphb_berangkat_perempuan, jphb_tahun', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'jphb_id' => 'Jphb',
			'jphb_bank' => 'Bank Penerima Setoran',
			'jphb_daftar_laki' => 'Pendaftar Laki-laki',
			'jphb_daftar_perempuan' => 'Pendaftar Perempuan',
			'jphb_batal_laki' => 'Batal Laki-laki',
			'jphb_batal_perempuan' => 'Batal Perempuan',
			'jphb_berangkat_laki' => 'Berangkat Laki-laki',
			'jphb_berangkat_perempuan' => 'Berangkat Perempuan',
			'jphb_tahun' => 'Tahun',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('jphb_id',$this->jphb_id);
		$criteria->compare('jphb_bank',$this->jphb_bank,true);
		$criteria->compare('jphb_daftar_laki',$this->jphb_daftar_laki);
		$criteria->compare('jphb_daftar_perempuan',$this->jphb_daftar_perempuan);
		$criteria->compare('jphb_batal_laki',$this->jphb_batal_laki);
		$criteria->compare('jphb_batal_perempuan',$this->jphb_batal_perempuan);
		$criteria->compare('jphb_berangkat_laki',$this->jphb_berangkat_laki);
		$criteria->compare('jphb_berangkat_perempuan',$this->jphb_berangkat_perempuan);
		$criteria->compare('jphb_tahun',$this->jphb_tahun);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}